﻿using System;
using System.Collections.ObjectModel;

namespace ilgolosone.DomainModel.Entities
{
    [Serializable]
    public class TableLocation
    {
        public int Id { get; protected set; }
        public string Description { get; set; }

        internal TableLocation(int id)
        {
            Id = id;
        }

        public override string ToString()
        {
            return Description;
        }
    }

    [Serializable]
    public class TableLocations : ReadOnlyCollection<TableLocation>
    {
        public static TableLocation Interno = new TableLocation(1) { Description = "Interno" };
        public static TableLocation Esterno = new TableLocation(2) { Description = "Esterno" };

        public TableLocations()
            : base(new[] { Interno, Esterno })
        { }
    }
}
